interface myInterface{
    name:string,
    age:number
}

interface myInterface{
    sex:"male"|"female",
    // sayName:()=>void
    sayName():void
}

const person:myInterface = {
    name:"Jim",
    age:18,
    sex:"male",
    sayName(){
        console.log(this.name);
    }
}

class Person implements myInterface{
    name: string;
    age: number;
    sex: "male" | "female";
    sayName(): void {
        console.log(this.name);
    }
}

console.log(person);

interface myList {
    [index:number]:Obj
}

const arr:myList = [
    {name:"黑猫警长"}
]